# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lodowep
pkgver=1.2.1
pkgrel=5
pkgdesc='Lodowep is a tool for analyzing password strength of accounts on a Lotus Domino webserver system.'
url='http://www.cqure.net/wp/lodowep/'
groups=('blackarch' 'blackarch-cracker')
license=('GPL')
depends=('java-environment')
arch=('any')
source=("http://www.cqure.net/tools/lodowep-bin-${pkgver//./_}.zip")
sha512sums=('ebe6b30e6c20121d4a5ca00b826d60f9711c8a608b3ffcfc296b18c6279c2888ba1c906fe4cdf6ad60c30e99f4e1f163c880957f7cb48308e783d0bf52e74f47')

package() {
  cd "$pkgname/bin"

  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 "$pkgname.jar" "$pkgdir/usr/share/$pkgname/$pkgname.jar"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" readme

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec java -jar $pkgname.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

